//
//  UIGlossyButton+MPNavigationBarTitle.m
//  MissPaparazzi
//
//  Created by Alexey Aleshkov on 01.09.12.
//  Copyright (c) 2012 DzeTech. All rights reserved.
//


#import "UIGlossyButton+MPNavigationBarTitle.h"


@implementation UIGlossyButton (MPNavigationBarTitle)

- (void)setMPNavigationBarTitleStyle
{
	[self.titleLabel setFont:[UIFont boldSystemFontOfSize:12.0]];
	self.tintColor = [UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:1.0];
	self.disabledBorderColor = [UIColor lightGrayColor];
	[self setGradientType:kUIGlossyButtonGradientTypeLinearSmoothStandard];
	[self useWhiteLabel:YES];
	self.buttonCornerRadius = 5.0;
	self.strokeType = kUIGlossyButtonStrokeTypeInnerBevelDown;
	self.buttonBorderWidth = 1.0;
	self.innerBorderWidth = 0.0;
	self.borderColor = [UIColor colorWithRed:0.15 green:0.15 blue:0.15 alpha:1.0];
	
	[self setNeedsDisplay];
}

- (void)setPurpleStyle
{
	[self.titleLabel setFont:[UIFont boldSystemFontOfSize:12.0]];
	self.tintColor = [UIColor colorWithRed:86/255.0 green:43/255.0 blue:127/255.0 alpha:1.0];
	self.disabledBorderColor = [UIColor lightGrayColor];
	[self setGradientType:kUIGlossyButtonGradientTypeLinearSmoothExtreme];
	[self useWhiteLabel:YES];
	self.buttonCornerRadius = 5.0;
	self.strokeType = kUIGlossyButtonStrokeTypeInnerBevelDown;
	self.buttonBorderWidth = 1.0;
	self.innerBorderWidth = 0.0;
	self.borderColor = [UIColor colorWithRed:86/255.0 green:43/255.0 blue:127/255.0 alpha:1.0];
	[self setTitleShadowColor:[UIColor darkTextColor] forState:UIControlStateNormal];
	self.titleLabel.shadowOffset = CGSizeMake(0, -1);
	
	[self setNeedsDisplay];
}

- (void)setGrayStyle
{
	[self.titleLabel setFont:[UIFont boldSystemFontOfSize:15.0]];
	[self setTitleColor:[UIColor colorWithRed:0.75 green:0.75 blue:0.75 alpha:1.0] forState:UIControlStateNormal];
	[self setTitleColor:[UIColor colorWithRed:0.5 green:0.5 blue:0.5 alpha:1.0] forState:UIControlStateDisabled];
	self.titleLabel.shadowOffset = CGSizeMake(0, -1);
	[self setTitleShadowColor:[UIColor darkTextColor] forState:UIControlStateNormal];
	[self setTitleShadowColor:[UIColor darkTextColor] forState:UIControlStateDisabled];
	self.tintColor = [UIColor colorWithRed:0.25 green:0.25 blue:0.25 alpha:1.0];
	self.disabledColor = self.tintColor;
	[self setGradientType:kUIGlossyButtonGradientTypeLinearSmoothExtreme];
	self.buttonCornerRadius = 3.0;
	self.strokeType = kUIGlossyButtonStrokeTypeInnerBevelDown;
	self.buttonBorderWidth = 1.0;
	self.innerBorderWidth = 0.5;
	self.borderColor = [UIColor colorWithRed:0.15 green:0.15 blue:0.15 alpha:1.0];
	self.disabledBorderColor = self.borderColor;
	self.invertGraidentOnSelected = YES;
	
	[self setNeedsDisplay];
}

@end
